package com.lanchetech.dao;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

import com.lanchetech.bean.request.ShopAmountReq;
import com.lanchetech.bean.vo.ShopAmountVO;
import org.apache.ibatis.annotations.Param;

import com.lanchetech.entity.ShopAmount;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ShopAmountMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ShopAmount record);

    int insertSelective(ShopAmount record);

    ShopAmount selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShopAmount record);

    int updateByPrimaryKey(ShopAmount record);

    ShopAmount findOneByShopId(@Param("shopId")Long shopId);

	Long countByAmountGreaterThan(@Param("minAmount")BigDecimal minAmount);

    Long countByAmountGreaterThanAndIndustryFirstId(@Param("minAmount")BigDecimal minAmount,@Param("industryFirstId")Long industryFirstId);

    Long countAll();

    Long countByIndustryFirstId(@Param("industryFirstId")Long industryFirstId);

    int updateAmountAndUpdatedAtByShopId(@Param("updatedAmount")BigDecimal updatedAmount,@Param("updatedUpdatedAt")Date updatedUpdatedAt,@Param("shopId")Long shopId);

    List<ShopAmountVO> findAllPage(ShopAmountReq req);

}